Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mimeType detection for CSV file #353

Merged
merged 3 commits into from Apr 20, 2022
Merged

Conversation

vicpatel
Copy link
Contributor

Please take a look.

@vicpatel vicpatel requested a review from darh April 19, 2022 12:47
@vicpatel vicpatel force-pushed the 2022.3.x-fix-csv-file-upload branch from 394d500 to 1443290 Compare April 19, 2022 13:51
defer func() {
// reset settings after we're done
systemService.CurrentSettings.Compose.Record.Attachments.MaxSize = 0
systemService.CurrentSettings.Compose.Record.Attachments.Mimetypes = nil
}()

systemService.CurrentSettings.Compose.Record.Attachments.MaxSize = maxSizeLimit
systemService.CurrentSettings.Compose.Record.Attachments.Mimetypes = []string{
"application/octet-stream",
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this; No need to add fallback allowed mime-type after updating mime-type detection func, It extracts file mime-type more accurately now.

@vicpatel vicpatel force-pushed the 2022.3.x-fix-csv-file-upload branch from 0ef63ae to 8ba31ca Compare April 19, 2022 20:24
@darh darh requested a review from tjerman April 20, 2022 04:27
@tjerman tjerman merged commit 8ba31ca into 2022.3.x Apr 20, 2022
@tjerman tjerman deleted the 2022.3.x-fix-csv-file-upload branch April 20, 2022 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants